package com.napenalki.toto.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "SPECIAL_EVENT")
public class SpecialEvent extends Event {

    private SpecialEvents eventType;

    public SpecialEvent() {
        super();
    }

    public SpecialEvent(Date date, boolean isLocked, String result,
        SpecialEvents eventType) {
        super(date, isLocked, result);
        this.eventType = eventType;
    }
    
    public SpecialEvent(int id, Date date, boolean isLocked, String result,
        SpecialEvents eventType) {
        super(id, date, isLocked, result);
        this.eventType = eventType;
    }

    @Enumerated(EnumType.STRING)
    @Column(name = "EVENT_DETAILS")
    @NotNull
    public SpecialEvents getEventType() {
        return eventType;
    }

    public void setEventType(SpecialEvents eventType) {
        this.eventType = eventType;
    }
    
    @Override
    public String toString() {
        return eventType.toString();
    }
}
